<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>BonoboObject</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
<link rel="home" href="index.html" title="Libbonobo Reference Manual">
<link rel="up" href="factories.html" title="Objects, Factories, Reference Counting">
<link rel="prev" href="factories.html" title="Objects, Factories, Reference Counting">
<link rel="next" href="libbonobo-bonobo-generic-factory.html" title="BonoboGenericFactory">
<meta name="generator" content="GTK-Doc V1.15.1 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td><a accesskey="p" href="factories.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="factories.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">Libbonobo Reference Manual</th>
<td><a accesskey="n" href="libbonobo-bonobo-generic-factory.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts">
<a href="#libbonobo-bonobo-object.synopsis" class="shortcut">Top</a>
                   | 
                  <a href="#libbonobo-bonobo-object.description" class="shortcut">Description</a>
                   | 
                  <a href="#libbonobo-bonobo-object.object-hierarchy" class="shortcut">Object Hierarchy</a>
                   | 
                  <a href="#libbonobo-bonobo-object.properties" class="shortcut">Properties</a>
                   | 
                  <a href="#libbonobo-bonobo-object.signals" class="shortcut">Signals</a>
</td></tr>
</table>
<div class="refentry">
<a name="libbonobo-bonobo-object"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="libbonobo-bonobo-object.top_of_page"></a>BonoboObject</span></h2>
<p>BonoboObject — Base object for wrapping Bonobo::Unknown derived objects. Implements
<a class="xref" href="libbonobo-bonobo-object.html#bonobo-unknown-img" title="Figure 2. The Bonobo::Unknown interface">Figure 2, “The Bonobo::Unknown interface”</a>.</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<a name="libbonobo-bonobo-object.synopsis"></a><h2>Synopsis</h2>
<a name="BonoboObject"></a><pre class="synopsis">#define             <a class="link" href="libbonobo-bonobo-object.html#BONOBO-OBJECT-TYPE:CAPS" title="BONOBO_OBJECT_TYPE">BONOBO_OBJECT_TYPE</a>
#define             <a class="link" href="libbonobo-bonobo-object.html#BONOBO-OBJREF:CAPS" title="BONOBO_OBJREF()">BONOBO_OBJREF</a>                       (o)
<span class="returnvalue">void</span>                (<a class="link" href="libbonobo-bonobo-object.html#BonoboObjectPOAFn" title="BonoboObjectPOAFn ()">*BonoboObjectPOAFn</a>)                (<em class="parameter"><code><span class="type">PortableServer_Servant</span> servant</code></em>,
                                                         <em class="parameter"><code><span class="type">CORBA_Environment</span> *ev</code></em>);
                    <a class="link" href="libbonobo-bonobo-object.html#BonoboObject-struct" title="BonoboObject">BonoboObject</a>;
                    <a class="link" href="libbonobo-bonobo-object.html#BonoboObjectClass" title="BonoboObjectClass">BonoboObjectClass</a>;
<span class="returnvalue">void</span>                <a class="link" href="libbonobo-bonobo-object.html#bonobo-object-add-interface" title="bonobo_object_add_interface ()">bonobo_object_add_interface</a>         (<em class="parameter"><code><a class="link" href="libbonobo-bonobo-object.html#BonoboObject"><span class="type">BonoboObject</span></a> *object</code></em>,
                                                         <em class="parameter"><code><a class="link" href="libbonobo-bonobo-object.html#BonoboObject"><span class="type">BonoboObject</span></a> *newobj</code></em>);
<a class="link" href="libbonobo-bonobo-object.html#BonoboObject"><span class="returnvalue">BonoboObject</span></a> *      <a class="link" href="libbonobo-bonobo-object.html#bonobo-object-query-local-interface" title="bonobo_object_query_local_interface ()">bonobo_object_query_local_interface</a> (<em class="parameter"><code><a class="link" href="libbonobo-bonobo-object.html#BonoboObject"><span class="type">BonoboObject</span></a> *object</code></em>,
                                                         <em class="parameter"><code>const <span class="type">char</span> *repo_id</code></em>);
<span class="returnvalue">Bonobo_Unknown</span>      <a class="link" href="libbonobo-bonobo-object.html#bonobo-object-query-interface" title="bonobo_object_query_interface ()">bonobo_object_query_interface</a>       (<em class="parameter"><code><a class="link" href="libbonobo-bonobo-object.html#BonoboObject"><span class="type">BonoboObject</span></a> *object</code></em>,
                                                         <em class="parameter"><code>const <span class="type">char</span> *repo_id</code></em>,
                                                         <em class="parameter"><code><span class="type">CORBA_Environment</span> *opt_ev</code></em>);
<span class="returnvalue">Bonobo_Unknown</span>      <a class="link" href="libbonobo-bonobo-object.html#bonobo-object-query-remote" title="bonobo_object_query_remote ()">bonobo_object_query_remote</a>          (<em class="parameter"><code><span class="type">Bonobo_Unknown</span> unknown</code></em>,
                                                         <em class="parameter"><code>const <span class="type">char</span> *repo_id</code></em>,
                                                         <em class="parameter"><code><span class="type">CORBA_Environment</span> *opt_ev</code></em>);
<span class="returnvalue">Bonobo_Unknown</span>      <a class="link" href="libbonobo-bonobo-object.html#bonobo-object-corba-objref" title="bonobo_object_corba_objref ()">bonobo_object_corba_objref</a>          (<em class="parameter"><code><a class="link" href="libbonobo-bonobo-object.html#BonoboObject"><span class="type">BonoboObject</span></a> *object</code></em>);
<span class="returnvalue">Bonobo_Unknown</span>      <a class="link" href="libbonobo-bonobo-object.html#bonobo-object-dup-ref" title="bonobo_object_dup_ref ()">bonobo_object_dup_ref</a>               (<em class="parameter"><code><span class="type">Bonobo_Unknown</span> object</code></em>,
                                                         <em class="parameter"><code><span class="type">CORBA_Environment</span> *opt_ev</code></em>);
<span class="returnvalue">Bonobo_Unknown</span>      <a class="link" href="libbonobo-bonobo-object.html#bonobo-object-release-unref" title="bonobo_object_release_unref ()">bonobo_object_release_unref</a>         (<em class="parameter"><code><span class="type">Bonobo_Unknown</span> object</code></em>,
                                                         <em class="parameter"><code><span class="type">CORBA_Environment</span> *opt_ev</code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a>            <a class="link" href="libbonobo-bonobo-object.html#bonobo-object-ref" title="bonobo_object_ref ()">bonobo_object_ref</a>                   (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> obj</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="libbonobo-bonobo-object.html#bonobo-object-idle-unref" title="bonobo_object_idle_unref ()">bonobo_object_idle_unref</a>            (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> obj</code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a>            <a class="link" href="libbonobo-bonobo-object.html#bonobo-object-unref" title="bonobo_object_unref ()">bonobo_object_unref</a>                 (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> obj</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="libbonobo-bonobo-object.html#bonobo-object-set-immortal" title="bonobo_object_set_immortal ()">bonobo_object_set_immortal</a>          (<em class="parameter"><code><a class="link" href="libbonobo-bonobo-object.html#BonoboObject"><span class="type">BonoboObject</span></a> *object</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> immortal</code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a>            <a class="link" href="libbonobo-bonobo-object.html#bonobo-object-trace-refs" title="bonobo_object_trace_refs ()">bonobo_object_trace_refs</a>            (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> obj</code></em>,
                                                         <em class="parameter"><code>const <span class="type">char</span> *fn</code></em>,
                                                         <em class="parameter"><code><span class="type">int</span> line</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> ref</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="libbonobo-bonobo-object.html#bonobo-object-dump-interfaces" title="bonobo_object_dump_interfaces ()">bonobo_object_dump_interfaces</a>       (<em class="parameter"><code><a class="link" href="libbonobo-bonobo-object.html#BonoboObject"><span class="type">BonoboObject</span></a> *object</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="libbonobo-bonobo-object.html#bonobo-object-check-env" title="bonobo_object_check_env ()">bonobo_object_check_env</a>             (<em class="parameter"><code><a class="link" href="libbonobo-bonobo-object.html#BonoboObject"><span class="type">BonoboObject</span></a> *object</code></em>,
                                                         <em class="parameter"><code><span class="type">CORBA_Object</span> corba_object</code></em>,
                                                         <em class="parameter"><code><span class="type">CORBA_Environment</span> *ev</code></em>);
#define             <a class="link" href="libbonobo-bonobo-object.html#BONOBO-OBJECT-CHECK:CAPS" title="BONOBO_OBJECT_CHECK()">BONOBO_OBJECT_CHECK</a>                 (o,
                                                         c,
                                                         e)
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="libbonobo-bonobo-object.html#bonobo-unknown-ping" title="bonobo_unknown_ping ()">bonobo_unknown_ping</a>                 (<em class="parameter"><code><span class="type">Bonobo_Unknown</span> object</code></em>,
                                                         <em class="parameter"><code><span class="type">CORBA_Environment</span> *opt_ev</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="libbonobo-bonobo-object.html#bonobo-object-list-unref-all" title="bonobo_object_list_unref_all ()">bonobo_object_list_unref_all</a>        (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Doubly-Linked-Lists.html#GList"><span class="type">GList</span></a> **list</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="libbonobo-bonobo-object.html#bonobo-object-slist-unref-all" title="bonobo_object_slist_unref_all ()">bonobo_object_slist_unref_all</a>       (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a> **list</code></em>);
<a class="link" href="libbonobo-bonobo-object.html#BonoboObject"><span class="returnvalue">BonoboObject</span></a> *      <a class="link" href="libbonobo-bonobo-object.html#bonobo-object" title="bonobo_object ()">bonobo_object</a>                       (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> p</code></em>);
#define             <a class="link" href="libbonobo-bonobo-object.html#bonobo-object-fast" title="bonobo_object_fast()">bonobo_object_fast</a>                  (o)
#define             <a class="link" href="libbonobo-bonobo-object.html#bonobo-object-from-servant" title="bonobo_object_from_servant()">bonobo_object_from_servant</a>          (s)
#define             <a class="link" href="libbonobo-bonobo-object.html#bonobo-object-get-servant" title="bonobo_object_get_servant()">bonobo_object_get_servant</a>           (o)
<span class="returnvalue">PortableServer_POA</span>  <a class="link" href="libbonobo-bonobo-object.html#bonobo-object-get-poa" title="bonobo_object_get_poa ()">bonobo_object_get_poa</a>               (<em class="parameter"><code><a class="link" href="libbonobo-bonobo-object.html#BonoboObject"><span class="type">BonoboObject</span></a> *object</code></em>);
<a href="http://library.gnome.org/devel/gobject/unstable/gobject-Type-Information.html#GType"><span class="returnvalue">GType</span></a>               <a class="link" href="libbonobo-bonobo-object.html#bonobo-type-unique" title="bonobo_type_unique ()">bonobo_type_unique</a>                  (<em class="parameter"><code><a href="http://library.gnome.org/devel/gobject/unstable/gobject-Type-Information.html#GType"><span class="type">GType</span></a> parent_type</code></em>,
                                                         <em class="parameter"><code><a class="link" href="libbonobo-bonobo-object.html#BonoboObjectPOAFn" title="BonoboObjectPOAFn ()"><span class="type">BonoboObjectPOAFn</span></a> init_fn</code></em>,
                                                         <em class="parameter"><code><a class="link" href="libbonobo-bonobo-object.html#BonoboObjectPOAFn" title="BonoboObjectPOAFn ()"><span class="type">BonoboObjectPOAFn</span></a> fini_fn</code></em>,
                                                         <em class="parameter"><code><span class="type">int</span> epv_struct_offset</code></em>,
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Type-Information.html#GTypeInfo"><span class="type">GTypeInfo</span></a> *info</code></em>,
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *type_name</code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="libbonobo-bonobo-object.html#bonobo-type-setup" title="bonobo_type_setup ()">bonobo_type_setup</a>                   (<em class="parameter"><code><a href="http://library.gnome.org/devel/gobject/unstable/gobject-Type-Information.html#GType"><span class="type">GType</span></a> type</code></em>,
                                                         <em class="parameter"><code><a class="link" href="libbonobo-bonobo-object.html#BonoboObjectPOAFn" title="BonoboObjectPOAFn ()"><span class="type">BonoboObjectPOAFn</span></a> init_fn</code></em>,
                                                         <em class="parameter"><code><a class="link" href="libbonobo-bonobo-object.html#BonoboObjectPOAFn" title="BonoboObjectPOAFn ()"><span class="type">BonoboObjectPOAFn</span></a> fini_fn</code></em>,
                                                         <em class="parameter"><code><span class="type">int</span> epv_struct_offset</code></em>);
#define             <a class="link" href="libbonobo-bonobo-object.html#BONOBO-TYPE-FUNC-FULL:CAPS" title="BONOBO_TYPE_FUNC_FULL()">BONOBO_TYPE_FUNC_FULL</a>               (class_name,
                                                         corba_name,
                                                         parent,
                                                         prefix)
#define             <a class="link" href="libbonobo-bonobo-object.html#BONOBO-TYPE-FUNC:CAPS" title="BONOBO_TYPE_FUNC()">BONOBO_TYPE_FUNC</a>                    (class_name,
                                                         parent,
                                                         prefix)
</pre>
</div>
<div class="refsect1">
<a name="libbonobo-bonobo-object.object-hierarchy"></a><h2>Object Hierarchy</h2>
<pre class="synopsis">
  <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject">GObject</a>
   +----BonoboObject
         +----BonoboGenericFactory
         +----<a class="link" href="libbonobo-bonobo-persist.html#BonoboPersist">BonoboPersist</a>
         +----<a class="link" href="libbonobo-bonobo-moniker-extender.html#BonoboMonikerExtender">BonoboMonikerExtender</a>
         +----<a class="link" href="libbonobo-bonobo-item-container.html#BonoboItemContainer">BonoboItemContainer</a>
         +----<a class="link" href="libbonobo-bonobo-stream-memory.html#BonoboStreamMem">BonoboStreamMem</a>
         +----<a class="link" href="libbonobo-bonobo-item-handler.html#BonoboItemHandler">BonoboItemHandler</a>
         +----<a class="link" href="libbonobo-bonobo-listener.html#BonoboListener">BonoboListener</a>
         +----<a class="link" href="libbonobo-bonobo-moniker.html#BonoboMoniker">BonoboMoniker</a>
</pre>
</div>
<div class="refsect1">
<a name="libbonobo-bonobo-object.properties"></a><h2>Properties</h2>
<pre class="synopsis">
  "<a class="link" href="libbonobo-bonobo-object.html#BonoboObject--poa" title='The "poa" property'>poa</a>"                      <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a>              : Read / Write / Construct Only
</pre>
</div>
<div class="refsect1">
<a name="libbonobo-bonobo-object.signals"></a><h2>Signals</h2>
<pre class="synopsis">
  "<a class="link" href="libbonobo-bonobo-object.html#BonoboObject-destroy" title='The "destroy" signal'>destroy</a>"                                        : Run Last
  "<a class="link" href="libbonobo-bonobo-object.html#BonoboObject-system-exception" title='The "system-exception" signal'>system-exception</a>"                               : Run Last
</pre>
</div>
<div class="refsect1">
<a name="libbonobo-bonobo-object.description"></a><h2>Description</h2>
<p>
  BonoboObject provides an easy to use way of writing CORBA servers. It
  drastically simplifies the issues of epv and vepv construction by
  automating these, and automatically instantiates a CORBA_Object on
  g_object_new. This removes clutter from construction time. For
  libbonobo-2.0, it strongly deprecates <span class="type">BonoboXObject</span>.
</p>
<div class="figure">
<a name="bonobo-unknown-img"></a><p class="title"><b>Figure 2. The Bonobo::Unknown interface</b></p>
<div class="figure-contents"><div class="mediaobject"><img src="unknown.png" alt="The Bonobo::Unknown interface"></div></div>
</div>
<br class="figure-break"><p>
  The <code class="classname">Bonobo::Unknown</code> interface (wrapped by
  BonoboObject) is the foundation for the component system: it provides
  life cycle management for objects as well as service discovery.
</p>
<p>
  The Bonobo interfaces are all based on the
  <code class="classname">Bonobo::Unknown</code> interface.  This
  interface is very simple and provides two basic services:
  object lifetime management and object
  functionality-discovery.   This interface only contains three
  methods, here it is:
  </p>
<pre class="programlisting">
  module Bonobo {
      interface Unknown {
          void void ref ();
          void void unref ();
          Object query_interface (in string repoid);
      };
  };
  </pre>
<p>
</p>
<p>
  The <code class="function"><code class="function">ref()</code></code> and <code class="function"><code class="function">unref()</code></code>
  methods are used to control the lifetime of an object.  The
  <code class="function">query_interface</code> method is used to discover
  optional functionality provided by the object implementation.
</p>
<p>
  The lifetime management is based on reference counting: when a
  component is initially launched, it starts life with a reference
  count of one.  This reference is held by the component invoker.
  Each time a reference is kept to this object (say, you store a
  copy of the object in an array), the reference count is
  incremented.  Every time a reference goes out of scope, the
  reference count needs to be decremented.  When the reference
  count reaches zero, the component knows that there are no
  outstanding references to it, and it is safe to shutdown.  At
  this point, the component shuts down.
</p>
<p>
  It is possible to ask an object which implements the
  <code class="classname">Bonobo::Unknown</code> interface if it supports
  other CORBA interfaces.  For example, it would be possible to
  ask an object whether it supports the
  "IDL:Bonobo/EmbeddablePrint:1.0" interface to find out if it is
  possible to print its contents.  If the return value from
  invoking the <code class="function">query_interface</code> method on the
  interface is CORBA_OBJECT_NIL, then we know that the requested interface
  is not supported.  Otherwise, we can invoke
  IDL:Bonobo/EmbeddablePrint:1.0 methods on the returned CORBA
  Object.
</p>
<p>
  Clients of the <code class="function">query_interface</code> method use
  it to discover dynamically if a component supports a given
  interface.  Sometimes the client code would require a specific
  interface to exist, but many times it is possible to operate in
  a "downgraded" mode.  You should design your code to be able to
  cope with the lack of interfaces in objects.  This will allow
  your program to deal with more components, and this also allows
  components to work in more situations.
</p>
<p>
  For example, a help browser can load an HTML renderer component and
  ask this component which sort of features are supported by it:
  </p>
<pre class="programlisting">
stop_animations (BrowserHTML html)
{
  BrowserControl control
  control = html-&gt;query_interface ("IDL:Browser/Control:1.0");
  if (control)
          control-&gt;stop_animations ();
}
  </pre>
<p>
</p>
<p>
  The return value of the query_interface invocation contains a
  reference to a CORBA object that is derived from the
  <code class="classname">Bonobo::Unknown</code> interface or
  CORBA_OBJECT_NIL if the interface is not supported by the
  object.  And this interface would have been already
  <code class="function"><code class="function">ref()</code></code>ed before it was returned.  It is up
  to the caller to call <code class="function"><code class="function">unref()</code></code> when they are
  done using the interface.
</p>
<p>
  BonoboObject implements the Bonobo::Unknown interface and exports the
  implementations of the methods in this class to simplify creating
  new objects that inherit from Bonobo::Unknown.  This base object
  provides default implementations for the ref, unref and
  query_interface methods.
</p>
<p>
  Other implementations reuse this implementation by listing on their
  VEPV tables the bonobo_object_epv entry point vector.
</p>
<p>
  The <code class="classname">Bonobo::Unknown</code> interface is inspired
  by the Microsoft COM <code class="classname">IUnknown</code> interface
  but it has been translated into the CORBA world.
</p>
</div>
<div class="refsect1">
<a name="libbonobo-bonobo-object.details"></a><h2>Details</h2>
<div class="refsect2">
<a name="BONOBO-OBJECT-TYPE:CAPS"></a><h3>BONOBO_OBJECT_TYPE</h3>
<pre class="programlisting">#define BONOBO_OBJECT_TYPE        BONOBO_TYPE_OBJECT /* deprecated, you should use BONOBO_TYPE_OBJECT */
</pre>
<p>
Returns the <span class="type">GtkType</span> for the BonoboObject object.
</p>
</div>
<hr>
<div class="refsect2">
<a name="BONOBO-OBJREF:CAPS"></a><h3>BONOBO_OBJREF()</h3>
<pre class="programlisting">#define BONOBO_OBJREF(o)          (bonobo_object_corba_objref(BONOBO_OBJECT(o)))
</pre>
<p>
    This macro returns the CORBA object reference inside a <a class="link" href="libbonobo-bonobo-object.html#BonoboObject"><span class="type">BonoboObject</span></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>o</code></em> :</span></p></td>
<td>a <a class="link" href="libbonobo-bonobo-object.html#BonoboObject"><span class="type">BonoboObject</span></a>
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="BonoboObjectPOAFn"></a><h3>BonoboObjectPOAFn ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                (*BonoboObjectPOAFn)                (<em class="parameter"><code><span class="type">PortableServer_Servant</span> servant</code></em>,
                                                         <em class="parameter"><code><span class="type">CORBA_Environment</span> *ev</code></em>);</pre>
<p>
Signature of POA initialization and finalization functions
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>servant</code></em> :</span></p></td>
<td>the object's servant
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>ev</code></em> :</span></p></td>
<td>CORBA environment
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="BonoboObject-struct"></a><h3>BonoboObject</h3>
<pre class="programlisting">typedef struct _BonoboObject BonoboObject;</pre>
<p>
Implements Bonobo::Unknown.
</p>
</div>
<hr>
<div class="refsect2">
<a name="BonoboObjectClass"></a><h3>BonoboObjectClass</h3>
<pre class="programlisting">typedef struct {
	GObjectClass parent_class;

	/* signals. */
	void         (*destroy)          (BonoboObject *object);
	void         (*system_exception) (BonoboObject *object,
					  CORBA_Object  cobject,
					  CORBA_Environment *ev);

	BonoboObjectPOAFn          poa_init_fn;
	BonoboObjectPOAFn          poa_fini_fn;

	POA_Bonobo_Unknown__vepv       *vepv;

	/* The offset of this class' additional epv */
	int                             epv_struct_offset;

	PortableServer_ServantBase__epv base_epv;
	POA_Bonobo_Unknown__epv         epv;

	gpointer                        dummy[4];
} BonoboObjectClass;
</pre>
<p>
BonoboObject's class.
</p>
</div>
<hr>
<div class="refsect2">
<a name="bonobo-object-add-interface"></a><h3>bonobo_object_add_interface ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                bonobo_object_add_interface         (<em class="parameter"><code><a class="link" href="libbonobo-bonobo-object.html#BonoboObject"><span class="type">BonoboObject</span></a> *object</code></em>,
                                                         <em class="parameter"><code><a class="link" href="libbonobo-bonobo-object.html#BonoboObject"><span class="type">BonoboObject</span></a> *newobj</code></em>);</pre>
<p>
Adds the interfaces supported by <em class="parameter"><code>newobj</code></em> to the list of interfaces
for <em class="parameter"><code>object</code></em>.  This function adds the interfaces supported by
<em class="parameter"><code>newobj</code></em> to the list of interfaces support by <em class="parameter"><code>object</code></em>. It should never
be used when the object has been exposed to the world. This is a firm
part of the contract.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
<td>The BonoboObject to which an interface is going to be added.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>newobj</code></em> :</span></p></td>
<td>The BonoboObject containing the new interface to be added.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="bonobo-object-query-local-interface"></a><h3>bonobo_object_query_local_interface ()</h3>
<pre class="programlisting"><a class="link" href="libbonobo-bonobo-object.html#BonoboObject"><span class="returnvalue">BonoboObject</span></a> *      bonobo_object_query_local_interface (<em class="parameter"><code><a class="link" href="libbonobo-bonobo-object.html#BonoboObject"><span class="type">BonoboObject</span></a> *object</code></em>,
                                                         <em class="parameter"><code>const <span class="type">char</span> *repo_id</code></em>);</pre>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
<td>A <a class="link" href="libbonobo-bonobo-object.html#BonoboObject"><span class="type">BonoboObject</span></a> which is the aggregate of multiple objects.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>repo_id</code></em> :</span></p></td>
<td>The id of the interface being queried.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> A <a class="link" href="libbonobo-bonobo-object.html#BonoboObject"><span class="type">BonoboObject</span></a> for the requested interface.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="bonobo-object-query-interface"></a><h3>bonobo_object_query_interface ()</h3>
<pre class="programlisting"><span class="returnvalue">Bonobo_Unknown</span>      bonobo_object_query_interface       (<em class="parameter"><code><a class="link" href="libbonobo-bonobo-object.html#BonoboObject"><span class="type">BonoboObject</span></a> *object</code></em>,
                                                         <em class="parameter"><code>const <span class="type">char</span> *repo_id</code></em>,
                                                         <em class="parameter"><code><span class="type">CORBA_Environment</span> *opt_ev</code></em>);</pre>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
<td>A BonoboObject to be queried for a given interface.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>repo_id</code></em> :</span></p></td>
<td>The name of the interface to be queried.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>opt_ev</code></em> :</span></p></td>
<td>optional exception environment
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> The CORBA interface named <em class="parameter"><code>repo_id</code></em> for <em class="parameter"><code>object</code></em>.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="bonobo-object-query-remote"></a><h3>bonobo_object_query_remote ()</h3>
<pre class="programlisting"><span class="returnvalue">Bonobo_Unknown</span>      bonobo_object_query_remote          (<em class="parameter"><code><span class="type">Bonobo_Unknown</span> unknown</code></em>,
                                                         <em class="parameter"><code>const <span class="type">char</span> *repo_id</code></em>,
                                                         <em class="parameter"><code><span class="type">CORBA_Environment</span> *opt_ev</code></em>);</pre>
<p>
A helper wrapper for query interface
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>unknown</code></em> :</span></p></td>
<td>an unknown object ref ( or NIL )
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>repo_id</code></em> :</span></p></td>
<td>the interface to query for
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>opt_ev</code></em> :</span></p></td>
<td>an optional exception environment
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> the interface or CORBA_OBJECT_NIL
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="bonobo-object-corba-objref"></a><h3>bonobo_object_corba_objref ()</h3>
<pre class="programlisting"><span class="returnvalue">Bonobo_Unknown</span>      bonobo_object_corba_objref          (<em class="parameter"><code><a class="link" href="libbonobo-bonobo-object.html#BonoboObject"><span class="type">BonoboObject</span></a> *object</code></em>);</pre>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
<td>A BonoboObject whose CORBA object is requested.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> The CORBA interface object for which <em class="parameter"><code>object</code></em> is a wrapper.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="bonobo-object-dup-ref"></a><h3>bonobo_object_dup_ref ()</h3>
<pre class="programlisting"><span class="returnvalue">Bonobo_Unknown</span>      bonobo_object_dup_ref               (<em class="parameter"><code><span class="type">Bonobo_Unknown</span> object</code></em>,
                                                         <em class="parameter"><code><span class="type">CORBA_Environment</span> *opt_ev</code></em>);</pre>
<p>
This function returns a duplicated CORBA Object reference;
it also bumps the ref count on the object. This is ideal to
use in any method returning a Bonobo_Object in a CORBA impl.
If object is CORBA_OBJECT_NIL it is returned unaffected.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
<td>a Bonobo_Unknown corba object
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>opt_ev</code></em> :</span></p></td>
<td>an optional exception environment
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> duplicated &amp; ref'd corba object reference.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="bonobo-object-release-unref"></a><h3>bonobo_object_release_unref ()</h3>
<pre class="programlisting"><span class="returnvalue">Bonobo_Unknown</span>      bonobo_object_release_unref         (<em class="parameter"><code><span class="type">Bonobo_Unknown</span> object</code></em>,
                                                         <em class="parameter"><code><span class="type">CORBA_Environment</span> *opt_ev</code></em>);</pre>
<p>
This function releases a CORBA Object reference;
it also decrements the ref count on the bonobo object.
This is the converse of bonobo_object_dup_ref. We
tolerate object == CORBA_OBJECT_NIL silently.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
<td>a Bonobo_Unknown corba object
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>opt_ev</code></em> :</span></p></td>
<td>an optional exception environment
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> <code class="literal">CORBA_OBJECT_NIL</code>.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="bonobo-object-ref"></a><h3>bonobo_object_ref ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a>            bonobo_object_ref                   (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> obj</code></em>);</pre>
<p>
Increments the reference count for the aggregate BonoboObject.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>obj</code></em> :</span></p></td>
<td>A BonoboObject you want to ref-count
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> <em class="parameter"><code>object</code></em>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="bonobo-object-idle-unref"></a><h3>bonobo_object_idle_unref ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                bonobo_object_idle_unref            (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> obj</code></em>);</pre>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>obj</code></em> :</span></p></td>
<td>
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="bonobo-object-unref"></a><h3>bonobo_object_unref ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a>            bonobo_object_unref                 (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> obj</code></em>);</pre>
<p>
Decrements the reference count for the aggregate BonoboObject.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>obj</code></em> :</span></p></td>
<td>A BonoboObject you want to unref.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="bonobo-object-set-immortal"></a><h3>bonobo_object_set_immortal ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                bonobo_object_set_immortal          (<em class="parameter"><code><a class="link" href="libbonobo-bonobo-object.html#BonoboObject"><span class="type">BonoboObject</span></a> *object</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> immortal</code></em>);</pre>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
<td>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>immortal</code></em> :</span></p></td>
<td>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="bonobo-object-trace-refs"></a><h3>bonobo_object_trace_refs ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a>            bonobo_object_trace_refs            (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> obj</code></em>,
                                                         <em class="parameter"><code>const <span class="type">char</span> *fn</code></em>,
                                                         <em class="parameter"><code><span class="type">int</span> line</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> ref</code></em>);</pre>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>obj</code></em> :</span></p></td>
<td>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>fn</code></em> :</span></p></td>
<td>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>line</code></em> :</span></p></td>
<td>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>ref</code></em> :</span></p></td>
<td>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="bonobo-object-dump-interfaces"></a><h3>bonobo_object_dump_interfaces ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                bonobo_object_dump_interfaces       (<em class="parameter"><code><a class="link" href="libbonobo-bonobo-object.html#BonoboObject"><span class="type">BonoboObject</span></a> *object</code></em>);</pre>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
<td>
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="bonobo-object-check-env"></a><h3>bonobo_object_check_env ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                bonobo_object_check_env             (<em class="parameter"><code><a class="link" href="libbonobo-bonobo-object.html#BonoboObject"><span class="type">BonoboObject</span></a> *object</code></em>,
                                                         <em class="parameter"><code><span class="type">CORBA_Object</span> corba_object</code></em>,
                                                         <em class="parameter"><code><span class="type">CORBA_Environment</span> *ev</code></em>);</pre>
<p>
This routine verifies the <em class="parameter"><code>ev</code></em> environment for any fatal system
exceptions.  If a system exception occurs, the object raises a
"system_exception" signal.  The idea is that GObjects which are
used to wrap a CORBA interface can use this function to notify
the user if a fatal exception has occurred, causing the object
to become defunct.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
<td>The object on which we operate
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>corba_object</code></em> :</span></p></td>
<td>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>ev</code></em> :</span></p></td>
<td>CORBA Environment to check
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="BONOBO-OBJECT-CHECK:CAPS"></a><h3>BONOBO_OBJECT_CHECK()</h3>
<pre class="programlisting">#define             BONOBO_OBJECT_CHECK(o,c,e)</pre>
<p>
   Checks if the exception in <em class="parameter"><code>e</code></em> needs to be signaled.  If so, then
   the proper exception signal is generated on the BonoboObject object
   <em class="parameter"><code>o</code></em> for the CORBA reference <em class="parameter"><code>c</code></em>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>o</code></em> :</span></p></td>
<td>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>c</code></em> :</span></p></td>
<td>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>e</code></em> :</span></p></td>
<td>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="bonobo-unknown-ping"></a><h3>bonobo_unknown_ping ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            bonobo_unknown_ping                 (<em class="parameter"><code><span class="type">Bonobo_Unknown</span> object</code></em>,
                                                         <em class="parameter"><code><span class="type">CORBA_Environment</span> *opt_ev</code></em>);</pre>
<p>
Pings the object <em class="parameter"><code>object</code></em> using the ref/unref methods from Bonobo::Unknown.
You can use this one to see if a remote object has gone away.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
<td>a CORBA object reference of type Bonobo::Unknown
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>opt_ev</code></em> :</span></p></td>
<td>optional exception environment
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the Bonobo::Unknown <em class="parameter"><code>object</code></em> is alive.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="bonobo-object-list-unref-all"></a><h3>bonobo_object_list_unref_all ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                bonobo_object_list_unref_all        (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Doubly-Linked-Lists.html#GList"><span class="type">GList</span></a> **list</code></em>);</pre>
<p>
This routine unrefs all valid objects in
the list and then removes them from <em class="parameter"><code>list</code></em> if
they have not already been so removed.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>list</code></em> :</span></p></td>
<td>A list of BonoboObjects *s
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="bonobo-object-slist-unref-all"></a><h3>bonobo_object_slist_unref_all ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                bonobo_object_slist_unref_all       (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a> **list</code></em>);</pre>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>list</code></em> :</span></p></td>
<td>
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="bonobo-object"></a><h3>bonobo_object ()</h3>
<pre class="programlisting"><a class="link" href="libbonobo-bonobo-object.html#BonoboObject"><span class="returnvalue">BonoboObject</span></a> *      bonobo_object                       (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> p</code></em>);</pre>
<p>
This function can be passed a BonoboObject * or a
PortableServer_Servant, and it will return a BonoboObject *.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>p</code></em> :</span></p></td>
<td>a pointer to something
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> a BonoboObject or NULL on error.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="bonobo-object-fast"></a><h3>bonobo_object_fast()</h3>
<pre class="programlisting">#define             bonobo_object_fast(o)</pre>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>o</code></em> :</span></p></td>
<td>
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="bonobo-object-from-servant"></a><h3>bonobo_object_from_servant()</h3>
<pre class="programlisting">#define       bonobo_object_from_servant(s) ((BonoboObject *)(((guchar *) (s)) - BONOBO_OBJECT_HEADER_SIZE))
</pre>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>s</code></em> :</span></p></td>
<td>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="bonobo-object-get-servant"></a><h3>bonobo_object_get_servant()</h3>
<pre class="programlisting">#define       bonobo_object_get_servant(o)  ((PortableServer_Servant)((guchar *)(o) + BONOBO_OBJECT_HEADER_SIZE))
</pre>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>o</code></em> :</span></p></td>
<td>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="bonobo-object-get-poa"></a><h3>bonobo_object_get_poa ()</h3>
<pre class="programlisting"><span class="returnvalue">PortableServer_POA</span>  bonobo_object_get_poa               (<em class="parameter"><code><a class="link" href="libbonobo-bonobo-object.html#BonoboObject"><span class="type">BonoboObject</span></a> *object</code></em>);</pre>
<p>
Gets the POA associated with this part of the
BonoboObject aggregate it is possible to have
different POAs per interface.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
<td>the object associated with an interface
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> the poa, never NIL.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="bonobo-type-unique"></a><h3>bonobo_type_unique ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/gobject/unstable/gobject-Type-Information.html#GType"><span class="returnvalue">GType</span></a>               bonobo_type_unique                  (<em class="parameter"><code><a href="http://library.gnome.org/devel/gobject/unstable/gobject-Type-Information.html#GType"><span class="type">GType</span></a> parent_type</code></em>,
                                                         <em class="parameter"><code><a class="link" href="libbonobo-bonobo-object.html#BonoboObjectPOAFn" title="BonoboObjectPOAFn ()"><span class="type">BonoboObjectPOAFn</span></a> init_fn</code></em>,
                                                         <em class="parameter"><code><a class="link" href="libbonobo-bonobo-object.html#BonoboObjectPOAFn" title="BonoboObjectPOAFn ()"><span class="type">BonoboObjectPOAFn</span></a> fini_fn</code></em>,
                                                         <em class="parameter"><code><span class="type">int</span> epv_struct_offset</code></em>,
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Type-Information.html#GTypeInfo"><span class="type">GTypeInfo</span></a> *info</code></em>,
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *type_name</code></em>);</pre>
<p>
This function is the main entry point for deriving bonobo
server interfaces.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>parent_type</code></em> :</span></p></td>
<td>the parent GType
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>init_fn</code></em> :</span></p></td>
<td>a POA initialization function
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>fini_fn</code></em> :</span></p></td>
<td>a POA finialization function or NULL
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>epv_struct_offset</code></em> :</span></p></td>
<td>the offset into the struct that the epv
commences at, or 0 if we are inheriting a plain GObject
from a BonoboObject, adding no new CORBA interfaces
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
<td>the standard GTypeInfo.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>type_name</code></em> :</span></p></td>
<td>the name of the type being registered.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> the constructed GType.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="bonobo-type-setup"></a><h3>bonobo_type_setup ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            bonobo_type_setup                   (<em class="parameter"><code><a href="http://library.gnome.org/devel/gobject/unstable/gobject-Type-Information.html#GType"><span class="type">GType</span></a> type</code></em>,
                                                         <em class="parameter"><code><a class="link" href="libbonobo-bonobo-object.html#BonoboObjectPOAFn" title="BonoboObjectPOAFn ()"><span class="type">BonoboObjectPOAFn</span></a> init_fn</code></em>,
                                                         <em class="parameter"><code><a class="link" href="libbonobo-bonobo-object.html#BonoboObjectPOAFn" title="BonoboObjectPOAFn ()"><span class="type">BonoboObjectPOAFn</span></a> fini_fn</code></em>,
                                                         <em class="parameter"><code><span class="type">int</span> epv_struct_offset</code></em>);</pre>
<p>
This function initializes a type derived from BonoboObject, such that
when you instantiate a new object of this type with g_type_new the
CORBA object will be correctly created and embedded.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td>
<td>The type to initialize
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>init_fn</code></em> :</span></p></td>
<td>the POA_init function for the CORBA interface or NULL
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>fini_fn</code></em> :</span></p></td>
<td>NULL or a custom POA free fn.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>epv_struct_offset</code></em> :</span></p></td>
<td>the offset in the class structure where the epv is or 0
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> TRUE on success, FALSE on error.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="BONOBO-TYPE-FUNC-FULL:CAPS"></a><h3>BONOBO_TYPE_FUNC_FULL()</h3>
<pre class="programlisting">#define             BONOBO_TYPE_FUNC_FULL(class_name, corba_name, parent, prefix)</pre>
<p>
    Macro that includes all the boilerplate code need to register a
    new BonoboObject-derived class.  The programmer has to define two
    functions only: <em class="parameter"><code>prefix_init</code></em> and <em class="parameter"><code>prefix_class_init</code></em>.  As a result
    of the macro expansion, a function named @<code class="function">prefix_get_type()</code> is
    defined.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>class_name</code></em> :</span></p></td>
<td>Name of the GObject class, LikeThis
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>corba_name</code></em> :</span></p></td>
<td>Name of the CORBA interface, with IDL-to-C mapping, Like_This
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>parent</code></em> :</span></p></td>
<td>GType of the parent class, LIKE_TYPE_THIS
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>prefix</code></em> :</span></p></td>
<td>prefix of the implementation functions
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="BONOBO-TYPE-FUNC:CAPS"></a><h3>BONOBO_TYPE_FUNC()</h3>
<pre class="programlisting">#define             BONOBO_TYPE_FUNC(class_name, parent, prefix)</pre>
<p>
    Like <a class="link" href="libbonobo-bonobo-object.html#BONOBO-TYPE-FUNC:CAPS" title="BONOBO_TYPE_FUNC()"><span class="type">BONOBO_TYPE_FUNC</span></a>, but doesn't set POA ini and fini functions.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>class_name</code></em> :</span></p></td>
<td>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>parent</code></em> :</span></p></td>
<td>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>prefix</code></em> :</span></p></td>
<td>
</td>
</tr>
</tbody>
</table></div>
</div>
</div>
<div class="refsect1">
<a name="libbonobo-bonobo-object.property-details"></a><h2>Property Details</h2>
<div class="refsect2">
<a name="BonoboObject--poa"></a><h3>The <code class="literal">"poa"</code> property</h3>
<pre class="programlisting">  "poa"                      <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a>              : Read / Write / Construct Only</pre>
<p>
    Pass this property during construction to specify a custom POA for a BonoboObject. Example:
    </p>
<div class="informalexample">
  <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
    <tbody>
      <tr>
        <td class="listing_lines" align="right"><pre>1
2
3
4
5
6
7</pre></td>
        <td class="listing_code"><pre class="programlisting"><span class="normal"><a href="libbonobo-bonobo-object.html#BonoboObject">BonoboObject</a> </span><span class="symbol">*</span><span class="normal"> </span><span class="function">my_bonobo_object_new</span><span class="normal"> </span><span class="symbol">(</span><span class="type">void</span><span class="symbol">)</span>
<span class="cbracket">{</span>
<span class="normal">    </span><span class="usertype">BonoboObject</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">object</span><span class="symbol">;</span>
<span class="normal">    object </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#g-object-new">g_object_new</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">MY_TYPE_BONOBO_OBJECT</span><span class="symbol">,</span><span class="normal"> </span><span class="string">"poa"</span><span class="symbol">,</span>
<span class="normal">                   </span><span class="function"><a href="libbonobo-bonobo-main.html#bonobo-poa-get-threaded">bonobo_poa_get_threaded</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">BONOBO_POA_ALL_AT_IDLE</span><span class="symbol">),</span><span class="normal"> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS">NULL</a></span><span class="symbol">);</span>
<span class="normal">    </span><span class="keyword">return</span><span class="normal"> object</span><span class="symbol">;</span>
<span class="cbracket">}</span></pre></td>
      </tr>
    </tbody>
  </table>
</div>

<p>
</p>
</div>
</div>
<div class="refsect1">
<a name="libbonobo-bonobo-object.signal-details"></a><h2>Signal Details</h2>
<div class="refsect2">
<a name="BonoboObject-destroy"></a><h3>The <code class="literal">"destroy"</code> signal</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                user_function                      (<a class="link" href="libbonobo-bonobo-object.html#BonoboObject"><span class="type">BonoboObject</span></a> *bonoboobject,
                                                        <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a>      user_data)         : Run Last</pre>
<p>
    Signal emitted when the last reference of a BonoboObject has been
    lost and the object is being destroyed / finalized / deactivated.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>bonoboobject</code></em> :</span></p></td>
<td>the object which received the signal.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>user data set when the signal handler was connected.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="BonoboObject-system-exception"></a><h3>The <code class="literal">"system-exception"</code> signal</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                user_function                      (<a class="link" href="libbonobo-bonobo-object.html#BonoboObject"><span class="type">BonoboObject</span></a>         *bonoboobject,
                                                        <span class="type">CorbaObject</span>          *arg1,
                                                        <span class="type">BonoboCorbaException</span> *arg2,
                                                        <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a>              user_data)         : Run Last</pre>
<p>
    Signal emitted from bonobo_object_check_env if a system exception is identified.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>bonoboobject</code></em> :</span></p></td>
<td>the <a class="link" href="libbonobo-bonobo-object.html#BonoboObject"><span class="type">BonoboObject</span></a> which received the signal.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>arg1</code></em> :</span></p></td>
<td>the CORBA_Object contained in <em class="parameter"><code>bonoboobject</code></em>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>arg2</code></em> :</span></p></td>
<td>the exception that has just occurred.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>user data set when the signal handler was connected.</td>
</tr>
</tbody>
</table></div>
</div>
</div>
<div class="refsect1">
<a name="libbonobo-bonobo-object.see-also"></a><h2>See Also</h2>
<p>
<a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a>
</p>
</div>
</div>
<div class="footer">
<hr>
          Generated by GTK-Doc V1.15.1</div>
</body>
</html>